<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 对象和数组嵌套使用

    // 一条数据
    // var zhang = {  //对张三 姓名,班级,语文 数学 英语 描述
    //     name: "张三",
    //     chinese: 55,
    //     math: 66,
    //     english: 77,
    // }

    // 描述一个班所有人的  姓名,班级,语文 数学 英语 (一组数据)

    // 数组中嵌套对象  => 数组对象
    var list = [{
        name: "张三",
        class: "2217",
        chinese: 55,
        math: 66,
        english: 77,
    }, {
        name: "李四",
        class: "2217",
        chinese: 77,
        math: 86,
        english: 92,
    }, {
        name: "王五",
        class: "2215",
        chinese: 69,
        math: 94,
        english: 91,
    }]


    // 对象嵌套数组   => 对象数组
    var zhang = new Object({
        name: "张三",
        age: 18,
        isStudy: true,
        money: null,
        a: undefined,
        hobby: ["sing", "dance", "rap"],
        grade: {
            "chinese": 55,
            "math": 66,
            "english": 77,
        },
        say: function () {
            console.log("hello");
        }
    });
</script>

</html>